import { NetWork_Post, NetWork_Get } from './commonServer'

function getFeeItem(bodydata, callback) {
  let netapi = 'getFeeItem',
    reqError = {
      error: {
        code: '-1',
        msg: '获取失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

function addBill(bodydata, callback) {
  let netapi = 'addBill',
    reqError = {
      error: {
        code: '-1',
        msg: '记账提交失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

function patientBaseInfo(bodydata, callback) {
  let netapi = 'patientBaseInfo',
    reqError = {
      error: {
        code: '-1',
        msg: '请求失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

function addSign(bodydata, callback) {
  let netapi = 'addSign',
    reqError = {
      error: {
        code: '-1',
        msg: '体征提交失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

/**
 * 获取区患者列表
 * @param {input data} bodydata
 * @param {回调} callback
 */
function getPatientOfMyWard(bodydata, callback) {
  let netapi = 'getPatientOfMyWard',
    reqError = {
      error: {
        code: '-1',
        msg: '获取数据失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

/**
 * 批量体征录入
 * @param {input data} bodydata
 * @param {回调} callback
 */
function batchAddSign(bodydata, callback) {
  let netapi = 'batchAddSign',
    reqError = {
      error: {
        code: '-1',
        msg: '提交失败'
      }
    }
  NetWork_Post(netapi, bodydata, callback, reqError)
}

export {
  getFeeItem,
  addBill,
  patientBaseInfo,
  addSign,
  getPatientOfMyWard,
  batchAddSign
}
